﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                assembly=" Inovout.Kuajing"
				        namespace="Inovout.Kuajing.Models">

  <class name="Brand" table="Brand">
    <id name="Id" access="field.camelcase"
        column="BrandId" type="Int32">
      <generator class="native" />
    </id>
    <property name="Code" />
    <property name="Name" />
    <many-to-one name="ProductCategory" column="ProductCategoryId" class="Inovout.Kuajing.Models.ProductCategory" ></many-to-one>

    <set name="Locations" table="Brand_Locations" cascade="all">
      <key column="BrandId" foreign-key="fk_Brand_Locations" />
      <many-to-many class="Inovout.Locations.Location" column="LocationId" />
    </set>
    <property name="CreatedTime" access="field.camelcase" />
    <property name="CreatedUserName" access="field.camelcase" />
    <property name="ModifiedTime" access="field.camelcase" />
    <property name="ModifiedUserName" access="field.camelcase" />
    <property name="AccessedTime" access="field.camelcase" />
    <property name="AccessedUserName" access="field.camelcase" />
    <property name="Memo" />
    <property name="IsInvalid" />
  </class>
</hibernate-mapping>


